3.3.98 \(\int \frac {(a+b \sin (c+\frac {d}{x}))^2}{(e+f x)^3} \, dx\) [298]

3.3.98.1 Optimal result
3.3.98.2 Mathematica [A] (verified)
3.3.98.3 Rubi [A] (verified)
3.3.98.4 Maple [C] (verified)
3.3.98.5 Fricas [A] (verification not implemented)
3.3.98.6 Sympy [F(-1)]
3.3.98.7 Maxima [F]
3.3.98.8 Giac [B] (verification not implemented)
3.3.98.9 Mupad [F(-1)]

3.3.98.1 Optimal result

Integrand size = 22, antiderivative size = 470 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=-\frac {a^2 f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a^2}{e^2 \left (f+\frac {e}{x}\right )}-\frac {a b d f \cos \left (c+\frac {d}{x}\right )}{e^3 \left (f+\frac {e}{x}\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}+\frac {b^2 d^2 f \cos \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^4}-\frac {b^2 d \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (2 c-\frac {2 d f}{e}\right )}{e^3}-\frac {a b d^2 f \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )}{e^4}-\frac {a b f \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b^2 d f \cos \left (c+\frac {d}{x}\right ) \sin \left (c+\frac {d}{x}\right )}{e^3 \left (f+\frac {e}{x}\right )}-\frac {b^2 f \sin ^2\left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {a b d^2 f \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^4}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}-\frac {b^2 d^2 f \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^4} \]

output
-1/2*a^2*f/e^2/(f+e/x)^2+a^2/e^2/(f+e/x)+b^2*d^2*f*Ci(2*d*(f/e+1/x))*cos(2 
*c-2*d*f/e)/e^4-2*a*b*d*Ci(d*(f/e+1/x))*cos(c-d*f/e)/e^3-a*b*d*f*cos(c+d/x 
)/e^3/(f+e/x)-a*b*d^2*f*cos(c-d*f/e)*Si(d*(f/e+1/x))/e^4-b^2*d*cos(2*c-2*d 
*f/e)*Si(2*d*(f/e+1/x))/e^3-b^2*d*Ci(2*d*(f/e+1/x))*sin(2*c-2*d*f/e)/e^3-b 
^2*d^2*f*Si(2*d*(f/e+1/x))*sin(2*c-2*d*f/e)/e^4-a*b*d^2*f*Ci(d*(f/e+1/x))* 
sin(c-d*f/e)/e^4+2*a*b*d*Si(d*(f/e+1/x))*sin(c-d*f/e)/e^3-a*b*f*sin(c+d/x) 
/e^2/(f+e/x)^2+2*a*b*sin(c+d/x)/e^2/(f+e/x)-b^2*d*f*cos(c+d/x)*sin(c+d/x)/ 
e^3/(f+e/x)-1/2*b^2*f*sin(c+d/x)^2/e^2/(f+e/x)^2+b^2*sin(c+d/x)^2/e^2/(f+e 
/x)
 
3.3.98.2 Mathematica [A] (verified)

Time = 2.34 (sec) , antiderivative size = 740, normalized size of antiderivative = 1.57 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=-\frac {2 a^2 e^4+b^2 e^4+4 a b d e^2 f^2 x \cos \left (c+\frac {d}{x}\right )+4 a b d e f^3 x^2 \cos \left (c+\frac {d}{x}\right )+2 b^2 e^3 f x \cos \left (2 \left (c+\frac {d}{x}\right )\right )+b^2 e^2 f^2 x^2 \cos \left (2 \left (c+\frac {d}{x}\right )\right )-4 b^2 d f (e+f x)^2 \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \left (d f \cos \left (2 c-\frac {2 d f}{e}\right )-e \sin \left (2 c-\frac {2 d f}{e}\right )\right )+4 a b d f (e+f x)^2 \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \left (2 e \cos \left (c-\frac {d f}{e}\right )+d f \sin \left (c-\frac {d f}{e}\right )\right )-8 a b e^3 f x \sin \left (c+\frac {d}{x}\right )-4 a b e^2 f^2 x^2 \sin \left (c+\frac {d}{x}\right )+2 b^2 d e^2 f^2 x \sin \left (2 \left (c+\frac {d}{x}\right )\right )+2 b^2 d e f^3 x^2 \sin \left (2 \left (c+\frac {d}{x}\right )\right )+4 a b d^2 e^2 f^2 \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+8 a b d^2 e f^3 x \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+4 a b d^2 f^4 x^2 \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-8 a b d e^3 f \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-16 a b d e^2 f^2 x \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-8 a b d e f^3 x^2 \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+4 b^2 d e^3 f \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+8 b^2 d e^2 f^2 x \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+4 b^2 d e f^3 x^2 \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+4 b^2 d^2 e^2 f^2 \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+8 b^2 d^2 e f^3 x \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+4 b^2 d^2 f^4 x^2 \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{4 e^4 f (e+f x)^2} \]

input
Integrate[(a + b*Sin[c + d/x])^2/(e + f*x)^3,x]
 
output
-1/4*(2*a^2*e^4 + b^2*e^4 + 4*a*b*d*e^2*f^2*x*Cos[c + d/x] + 4*a*b*d*e*f^3 
*x^2*Cos[c + d/x] + 2*b^2*e^3*f*x*Cos[2*(c + d/x)] + b^2*e^2*f^2*x^2*Cos[2 
*(c + d/x)] - 4*b^2*d*f*(e + f*x)^2*CosIntegral[2*d*(f/e + x^(-1))]*(d*f*C 
os[2*c - (2*d*f)/e] - e*Sin[2*c - (2*d*f)/e]) + 4*a*b*d*f*(e + f*x)^2*CosI 
ntegral[d*(f/e + x^(-1))]*(2*e*Cos[c - (d*f)/e] + d*f*Sin[c - (d*f)/e]) - 
8*a*b*e^3*f*x*Sin[c + d/x] - 4*a*b*e^2*f^2*x^2*Sin[c + d/x] + 2*b^2*d*e^2* 
f^2*x*Sin[2*(c + d/x)] + 2*b^2*d*e*f^3*x^2*Sin[2*(c + d/x)] + 4*a*b*d^2*e^ 
2*f^2*Cos[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))] + 8*a*b*d^2*e*f^3*x*C 
os[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))] + 4*a*b*d^2*f^4*x^2*Cos[c - 
(d*f)/e]*SinIntegral[d*(f/e + x^(-1))] - 8*a*b*d*e^3*f*Sin[c - (d*f)/e]*Si 
nIntegral[d*(f/e + x^(-1))] - 16*a*b*d*e^2*f^2*x*Sin[c - (d*f)/e]*SinInteg 
ral[d*(f/e + x^(-1))] - 8*a*b*d*e*f^3*x^2*Sin[c - (d*f)/e]*SinIntegral[d*( 
f/e + x^(-1))] + 4*b^2*d*e^3*f*Cos[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + 
 x^(-1))] + 8*b^2*d*e^2*f^2*x*Cos[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + 
x^(-1))] + 4*b^2*d*e*f^3*x^2*Cos[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + x 
^(-1))] + 4*b^2*d^2*e^2*f^2*Sin[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + x^ 
(-1))] + 8*b^2*d^2*e*f^3*x*Sin[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + x^( 
-1))] + 4*b^2*d^2*f^4*x^2*Sin[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + x^(- 
1))])/(e^4*f*(e + f*x)^2)
 
3.3.98.3 Rubi [A] (verified)

Time = 1.18 (sec) , antiderivative size = 482, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3912, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx\)

\(\Big \downarrow \) 3912

\(\displaystyle -\int \left (\frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e \left (\frac {e}{x}+f\right )^2}-\frac {f \left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e \left (\frac {e}{x}+f\right )^3}\right )d\frac {1}{x}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2}{e^2 \left (\frac {e}{x}+f\right )}-\frac {a^2 f}{2 e^2 \left (\frac {e}{x}+f\right )^2}-\frac {a b d^2 f \sin \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {f d}{e}+\frac {d}{x}\right )}{e^4}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {f d}{e}+\frac {d}{x}\right )}{e^3}-\frac {a b d^2 f \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {f d}{e}+\frac {d}{x}\right )}{e^4}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {f d}{e}+\frac {d}{x}\right )}{e^3}-\frac {a b d f \cos \left (c+\frac {d}{x}\right )}{e^3 \left (\frac {e}{x}+f\right )}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (\frac {e}{x}+f\right )}-\frac {a b f \sin \left (c+\frac {d}{x}\right )}{e^2 \left (\frac {e}{x}+f\right )^2}+\frac {b^2 d^2 f \cos \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{e^4}-\frac {b^2 d \sin \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{e^3}-\frac {b^2 d^2 f \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{e^4}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{e^3}-\frac {b^2 d f \sin \left (c+\frac {d}{x}\right ) \cos \left (c+\frac {d}{x}\right )}{e^3 \left (\frac {e}{x}+f\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e^2 \left (\frac {e}{x}+f\right )}-\frac {b^2 f \sin ^2\left (c+\frac {d}{x}\right )}{2 e^2 \left (\frac {e}{x}+f\right )^2}\)

input
Int[(a + b*Sin[c + d/x])^2/(e + f*x)^3,x]
 
output
-1/2*(a^2*f)/(e^2*(f + e/x)^2) + a^2/(e^2*(f + e/x)) - (a*b*d*f*Cos[c + d/ 
x])/(e^3*(f + e/x)) - (2*a*b*d*Cos[c - (d*f)/e]*CosIntegral[(d*f)/e + d/x] 
)/e^3 + (b^2*d^2*f*Cos[2*c - (2*d*f)/e]*CosIntegral[(2*d*f)/e + (2*d)/x])/ 
e^4 - (b^2*d*CosIntegral[(2*d*f)/e + (2*d)/x]*Sin[2*c - (2*d*f)/e])/e^3 - 
(a*b*d^2*f*CosIntegral[(d*f)/e + d/x]*Sin[c - (d*f)/e])/e^4 - (a*b*f*Sin[c 
 + d/x])/(e^2*(f + e/x)^2) + (2*a*b*Sin[c + d/x])/(e^2*(f + e/x)) - (b^2*d 
*f*Cos[c + d/x]*Sin[c + d/x])/(e^3*(f + e/x)) - (b^2*f*Sin[c + d/x]^2)/(2* 
e^2*(f + e/x)^2) + (b^2*Sin[c + d/x]^2)/(e^2*(f + e/x)) - (a*b*d^2*f*Cos[c 
 - (d*f)/e]*SinIntegral[(d*f)/e + d/x])/e^4 + (2*a*b*d*Sin[c - (d*f)/e]*Si 
nIntegral[(d*f)/e + d/x])/e^3 - (b^2*d*Cos[2*c - (2*d*f)/e]*SinIntegral[(2 
*d*f)/e + (2*d)/x])/e^3 - (b^2*d^2*f*Sin[2*c - (2*d*f)/e]*SinIntegral[(2*d 
*f)/e + (2*d)/x])/e^4
 

3.3.98.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3912
Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f 
_.)*(x_))^(n_)])^(p_.), x_Symbol] :> Simp[1/(n*f)   Subst[Int[ExpandIntegra 
nd[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m, x], 
 x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p 
, 0] && IntegerQ[1/n]
 
3.3.98.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.96 (sec) , antiderivative size = 866, normalized size of antiderivative = 1.84

method result size
risch \(\frac {i a b \,d^{2} {\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right ) f}{2 e^{4}}+\frac {a b d \,{\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right )}{e^{3}}-\frac {a^{2}}{2 f \left (f x +e \right )^{2}}-\frac {b^{2}}{4 f \left (f x +e \right )^{2}}-\frac {d^{2} b^{2} {\mathrm e}^{-\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {2 i d}{x}+2 i c -\frac {2 i \left (c e -d f \right )}{e}\right ) f}{2 e^{4}}+\frac {i d \,b^{2} {\mathrm e}^{-\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {2 i d}{x}+2 i c -\frac {2 i \left (c e -d f \right )}{e}\right )}{2 e^{3}}-\frac {d^{2} b^{2} {\mathrm e}^{\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {2 i d}{x}-2 i c -\frac {2 \left (-i c e +i f d \right )}{e}\right ) f}{2 e^{4}}-\frac {i d \,b^{2} {\mathrm e}^{\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {2 i d}{x}-2 i c -\frac {2 \left (-i c e +i f d \right )}{e}\right )}{2 e^{3}}-\frac {i a b \,d^{2} {\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {i d}{x}-i c -\frac {-i c e +i f d}{e}\right ) f}{2 e^{4}}+\frac {a b d \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {i d}{x}-i c -\frac {-i c e +i f d}{e}\right )}{e^{3}}+\frac {i a b x \left (2 i d^{3} f^{4} x^{3}+6 i d^{3} e \,f^{3} x^{2}+6 i d^{3} e^{2} f^{2} x +2 i d^{3} e^{3} f \right ) \cos \left (\frac {c x +d}{x}\right )}{2 e^{3} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 f e x \,d^{2}+d^{2} e^{2}\right )}-\frac {a b x \left (-2 d^{2} f^{3} x^{3}-8 d^{2} e \,f^{2} x^{2}-10 d^{2} e^{2} f x -4 d^{2} e^{3}\right ) \sin \left (\frac {c x +d}{x}\right )}{2 e^{2} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 f e x \,d^{2}+d^{2} e^{2}\right )}+\frac {b^{2} x \left (-2 d^{2} f^{3} x^{3}-8 d^{2} e \,f^{2} x^{2}-10 d^{2} e^{2} f x -4 d^{2} e^{3}\right ) \cos \left (\frac {2 c x +2 d}{x}\right )}{8 e^{2} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 f e x \,d^{2}+d^{2} e^{2}\right )}+\frac {i b^{2} x \left (4 i d^{3} f^{4} x^{3}+12 i d^{3} e \,f^{3} x^{2}+12 i d^{3} e^{2} f^{2} x +4 i d^{3} e^{3} f \right ) \sin \left (\frac {2 c x +2 d}{x}\right )}{8 e^{3} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 f e x \,d^{2}+d^{2} e^{2}\right )}\) \(866\)
parts \(\text {Expression too large to display}\) \(1033\)
derivativedivides \(\text {Expression too large to display}\) \(1139\)
default \(\text {Expression too large to display}\) \(1139\)

input
int((a+b*sin(c+d/x))^2/(f*x+e)^3,x,method=_RETURNVERBOSE)
 
output
1/2*I*a*b*d^2/e^4*exp(-I*(c*e-d*f)/e)*Ei(1,I*d/x+I*c-I*(c*e-d*f)/e)*f+a*b* 
d/e^3*exp(-I*(c*e-d*f)/e)*Ei(1,I*d/x+I*c-I*(c*e-d*f)/e)-1/2/f/(f*x+e)^2*a^ 
2-1/4/f*b^2/(f*x+e)^2-1/2*d^2*b^2/e^4*exp(-2*I*(c*e-d*f)/e)*Ei(1,2*I*d/x+2 
*I*c-2*I*(c*e-d*f)/e)*f+1/2*I*d*b^2/e^3*exp(-2*I*(c*e-d*f)/e)*Ei(1,2*I*d/x 
+2*I*c-2*I*(c*e-d*f)/e)-1/2*d^2*b^2*exp(2*I*(c*e-d*f)/e)*Ei(1,-2*I*d/x-2*I 
*c-2*(-I*c*e+I*f*d)/e)/e^4*f-1/2*I*d*b^2*exp(2*I*(c*e-d*f)/e)*Ei(1,-2*I*d/ 
x-2*I*c-2*(-I*c*e+I*f*d)/e)/e^3-1/2*I*a*b*d^2*exp(I*(c*e-d*f)/e)*Ei(1,-I*d 
/x-I*c-(-I*c*e+I*f*d)/e)/e^4*f+a*b*d*exp(I*(c*e-d*f)/e)*Ei(1,-I*d/x-I*c-(- 
I*c*e+I*f*d)/e)/e^3+1/2*I*a*b/e^3*x*(2*I*d^3*f^4*x^3+2*I*d^3*e^3*f+6*I*d^3 
*e*f^3*x^2+6*I*d^3*e^2*f^2*x)/(f*x+e)^2/(d^2*f^2*x^2+2*d^2*e*f*x+d^2*e^2)* 
cos((c*x+d)/x)-1/2*a*b/e^2*x*(-2*d^2*f^3*x^3-8*d^2*e*f^2*x^2-10*d^2*e^2*f* 
x-4*d^2*e^3)/(f*x+e)^2/(d^2*f^2*x^2+2*d^2*e*f*x+d^2*e^2)*sin((c*x+d)/x)+1/ 
8*b^2*x/e^2*(-2*d^2*f^3*x^3-8*d^2*e*f^2*x^2-10*d^2*e^2*f*x-4*d^2*e^3)/(f*x 
+e)^2/(d^2*f^2*x^2+2*d^2*e*f*x+d^2*e^2)*cos(2*(c*x+d)/x)+1/8*I*b^2*x/e^3*( 
4*I*d^3*f^4*x^3+4*I*d^3*e^3*f+12*I*d^3*e*f^3*x^2+12*I*d^3*e^2*f^2*x)/(f*x+ 
e)^2/(d^2*f^2*x^2+2*d^2*e*f*x+d^2*e^2)*sin(2*(c*x+d)/x)
 
3.3.98.5 Fricas [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 710, normalized size of antiderivative = 1.51 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=\frac {b^{2} e^{2} f^{2} x^{2} + 2 \, b^{2} e^{3} f x - {\left (2 \, a^{2} + b^{2}\right )} e^{4} - 2 \, {\left (b^{2} e^{2} f^{2} x^{2} + 2 \, b^{2} e^{3} f x\right )} \cos \left (\frac {c x + d}{x}\right )^{2} - 4 \, {\left (2 \, {\left (a b d e f^{3} x^{2} + 2 \, a b d e^{2} f^{2} x + a b d e^{3} f\right )} \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) + {\left (a b d^{2} f^{4} x^{2} + 2 \, a b d^{2} e f^{3} x + a b d^{2} e^{2} f^{2}\right )} \operatorname {Si}\left (\frac {d f x + d e}{e x}\right )\right )} \cos \left (-\frac {c e - d f}{e}\right ) + 4 \, {\left ({\left (b^{2} d^{2} f^{4} x^{2} + 2 \, b^{2} d^{2} e f^{3} x + b^{2} d^{2} e^{2} f^{2}\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) - {\left (b^{2} d e f^{3} x^{2} + 2 \, b^{2} d e^{2} f^{2} x + b^{2} d e^{3} f\right )} \operatorname {Si}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right )\right )} \cos \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) - 4 \, {\left (a b d e f^{3} x^{2} + a b d e^{2} f^{2} x\right )} \cos \left (\frac {c x + d}{x}\right ) + 4 \, {\left ({\left (a b d^{2} f^{4} x^{2} + 2 \, a b d^{2} e f^{3} x + a b d^{2} e^{2} f^{2}\right )} \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) - 2 \, {\left (a b d e f^{3} x^{2} + 2 \, a b d e^{2} f^{2} x + a b d e^{3} f\right )} \operatorname {Si}\left (\frac {d f x + d e}{e x}\right )\right )} \sin \left (-\frac {c e - d f}{e}\right ) + 4 \, {\left ({\left (b^{2} d e f^{3} x^{2} + 2 \, b^{2} d e^{2} f^{2} x + b^{2} d e^{3} f\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) + {\left (b^{2} d^{2} f^{4} x^{2} + 2 \, b^{2} d^{2} e f^{3} x + b^{2} d^{2} e^{2} f^{2}\right )} \operatorname {Si}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right )\right )} \sin \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) + 4 \, {\left (a b e^{2} f^{2} x^{2} + 2 \, a b e^{3} f x - {\left (b^{2} d e f^{3} x^{2} + b^{2} d e^{2} f^{2} x\right )} \cos \left (\frac {c x + d}{x}\right )\right )} \sin \left (\frac {c x + d}{x}\right )}{4 \, {\left (e^{4} f^{3} x^{2} + 2 \, e^{5} f^{2} x + e^{6} f\right )}} \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e)^3,x, algorithm="fricas")
 
output
1/4*(b^2*e^2*f^2*x^2 + 2*b^2*e^3*f*x - (2*a^2 + b^2)*e^4 - 2*(b^2*e^2*f^2* 
x^2 + 2*b^2*e^3*f*x)*cos((c*x + d)/x)^2 - 4*(2*(a*b*d*e*f^3*x^2 + 2*a*b*d* 
e^2*f^2*x + a*b*d*e^3*f)*cos_integral((d*f*x + d*e)/(e*x)) + (a*b*d^2*f^4* 
x^2 + 2*a*b*d^2*e*f^3*x + a*b*d^2*e^2*f^2)*sin_integral((d*f*x + d*e)/(e*x 
)))*cos(-(c*e - d*f)/e) + 4*((b^2*d^2*f^4*x^2 + 2*b^2*d^2*e*f^3*x + b^2*d^ 
2*e^2*f^2)*cos_integral(2*(d*f*x + d*e)/(e*x)) - (b^2*d*e*f^3*x^2 + 2*b^2* 
d*e^2*f^2*x + b^2*d*e^3*f)*sin_integral(2*(d*f*x + d*e)/(e*x)))*cos(-2*(c* 
e - d*f)/e) - 4*(a*b*d*e*f^3*x^2 + a*b*d*e^2*f^2*x)*cos((c*x + d)/x) + 4*( 
(a*b*d^2*f^4*x^2 + 2*a*b*d^2*e*f^3*x + a*b*d^2*e^2*f^2)*cos_integral((d*f* 
x + d*e)/(e*x)) - 2*(a*b*d*e*f^3*x^2 + 2*a*b*d*e^2*f^2*x + a*b*d*e^3*f)*si 
n_integral((d*f*x + d*e)/(e*x)))*sin(-(c*e - d*f)/e) + 4*((b^2*d*e*f^3*x^2 
 + 2*b^2*d*e^2*f^2*x + b^2*d*e^3*f)*cos_integral(2*(d*f*x + d*e)/(e*x)) + 
(b^2*d^2*f^4*x^2 + 2*b^2*d^2*e*f^3*x + b^2*d^2*e^2*f^2)*sin_integral(2*(d* 
f*x + d*e)/(e*x)))*sin(-2*(c*e - d*f)/e) + 4*(a*b*e^2*f^2*x^2 + 2*a*b*e^3* 
f*x - (b^2*d*e*f^3*x^2 + b^2*d*e^2*f^2*x)*cos((c*x + d)/x))*sin((c*x + d)/ 
x))/(e^4*f^3*x^2 + 2*e^5*f^2*x + e^6*f)
 
3.3.98.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=\text {Timed out} \]

input
integrate((a+b*sin(c+d/x))**2/(f*x+e)**3,x)
 
output
Timed out
 
3.3.98.7 Maxima [F]

\[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=\int { \frac {{\left (b \sin \left (c + \frac {d}{x}\right ) + a\right )}^{2}}{{\left (f x + e\right )}^{3}} \,d x } \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e)^3,x, algorithm="maxima")
 
output
-1/2*a^2/(f^3*x^2 + 2*e*f^2*x + e^2*f) - 1/4*(b^2 + 4*(b^2*f^3*x^2 + 2*b^2 
*e*f^2*x + b^2*e^2*f)*integrate(1/4*cos(2*(c*x + d)/x)/(f^3*x^3 + 3*e*f^2* 
x^2 + 3*e^2*f*x + e^3), x) + 4*(b^2*f^3*x^2 + 2*b^2*e*f^2*x + b^2*e^2*f)*i 
ntegrate(1/4*cos(2*(c*x + d)/x)/((f^3*x^3 + 3*e*f^2*x^2 + 3*e^2*f*x + e^3) 
*cos(2*(c*x + d)/x)^2 + (f^3*x^3 + 3*e*f^2*x^2 + 3*e^2*f*x + e^3)*sin(2*(c 
*x + d)/x)^2), x) - 4*(a*b*f^3*x^2 + 2*a*b*e*f^2*x + a*b*e^2*f)*integrate( 
sin((c*x + d)/x)/(f^3*x^3 + 3*e*f^2*x^2 + 3*e^2*f*x + e^3), x) - 4*(a*b*f^ 
3*x^2 + 2*a*b*e*f^2*x + a*b*e^2*f)*integrate(sin((c*x + d)/x)/((f^3*x^3 + 
3*e*f^2*x^2 + 3*e^2*f*x + e^3)*cos((c*x + d)/x)^2 + (f^3*x^3 + 3*e*f^2*x^2 
 + 3*e^2*f*x + e^3)*sin((c*x + d)/x)^2), x))/(f^3*x^2 + 2*e*f^2*x + e^2*f)
 
3.3.98.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3078 vs. \(2 (466) = 932\).

Time = 0.59 (sec) , antiderivative size = 3078, normalized size of antiderivative = 6.55 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=\text {Too large to display} \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e)^3,x, algorithm="giac")
 
output
1/4*(4*b^2*c^2*d^3*e^2*f*cos(2*(c*e - d*f)/e)*cos_integral(-2*(c*e - d*f - 
 (c*x + d)*e/x)/e) - 8*b^2*c*d^4*e*f^2*cos(2*(c*e - d*f)/e)*cos_integral(- 
2*(c*e - d*f - (c*x + d)*e/x)/e) + 4*b^2*d^5*f^3*cos(2*(c*e - d*f)/e)*cos_ 
integral(-2*(c*e - d*f - (c*x + d)*e/x)/e) - 4*a*b*c^2*d^3*e^2*f*cos_integ 
ral(-(c*e - d*f - (c*x + d)*e/x)/e)*sin((c*e - d*f)/e) + 8*a*b*c*d^4*e*f^2 
*cos_integral(-(c*e - d*f - (c*x + d)*e/x)/e)*sin((c*e - d*f)/e) - 4*a*b*d 
^5*f^3*cos_integral(-(c*e - d*f - (c*x + d)*e/x)/e)*sin((c*e - d*f)/e) + 4 
*b^2*c^2*d^3*e^2*f*sin(2*(c*e - d*f)/e)*sin_integral(2*(c*e - d*f - (c*x + 
 d)*e/x)/e) - 8*b^2*c*d^4*e*f^2*sin(2*(c*e - d*f)/e)*sin_integral(2*(c*e - 
 d*f - (c*x + d)*e/x)/e) + 4*b^2*d^5*f^3*sin(2*(c*e - d*f)/e)*sin_integral 
(2*(c*e - d*f - (c*x + d)*e/x)/e) + 4*a*b*c^2*d^3*e^2*f*cos((c*e - d*f)/e) 
*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) - 8*a*b*c*d^4*e*f^2*cos((c*e 
- d*f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) + 4*a*b*d^5*f^3*cos( 
(c*e - d*f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) - 8*a*b*c^2*d^2 
*e^3*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x + d)*e/x)/e) + 16* 
a*b*c*d^3*e^2*f*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x + d)*e/ 
x)/e) - 8*a*b*d^4*e*f^2*cos((c*e - d*f)/e)*cos_integral(-(c*e - d*f - (c*x 
 + d)*e/x)/e) - 8*(c*x + d)*b^2*c*d^3*e^2*f*cos(2*(c*e - d*f)/e)*cos_integ 
ral(-2*(c*e - d*f - (c*x + d)*e/x)/e)/x + 8*(c*x + d)*b^2*d^4*e*f^2*cos(2* 
(c*e - d*f)/e)*cos_integral(-2*(c*e - d*f - (c*x + d)*e/x)/e)/x - 4*b^2...
 
3.3.98.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^3} \, dx=\int \frac {{\left (a+b\,\sin \left (c+\frac {d}{x}\right )\right )}^2}{{\left (e+f\,x\right )}^3} \,d x \]

input
int((a + b*sin(c + d/x))^2/(e + f*x)^3,x)
 
output
int((a + b*sin(c + d/x))^2/(e + f*x)^3, x)